﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Resources;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace FileClean.Language
{
    internal class LanguageManager
    {
        public ResourceManager rm;
        private CultureInfo cultureInfo;
        public LanguageManager()
        {
            rm = new ResourceManager("FileClean.Language.Strs_cn", typeof(Form1).Assembly);
            cultureInfo = CultureInfo.CurrentUICulture;
        }
        public String GetString(string key)
        {
            return rm.GetString(key);
        }
        public void SetLanguage(CultureInfo culture)
        {
            cultureInfo = culture;
            rm = new ResourceManager("Strs_" + culture.Name, typeof(Form1).Assembly);
        }
    }
}
